package com.pengtu.dao.contract;

import java.io.Serializable;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.pengtu.dao.hibernate.HibernateDao;
import com.pengtu.entity.contract.Inventor;

@Repository
public class InventorDao extends HibernateDao<Inventor, Serializable> {

	public void deleteInventorCid(String cid) {
		String hql = "delete from Inventor where cid = '" + cid +"'";
		Query query = getSession().createQuery(hql);
		query.executeUpdate();
	}

	public void deleteInventor(String cid, String codeed) {
		// TODO Auto-generated method stub
		String hql = "delete from Inventor where cid = '" + cid +"' and branchCode = '" + codeed +"'";
		Query query = getSession().createQuery(hql);
		query.executeUpdate();
	}

}
